package com.heima.apis.schedule;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.schedule.dto.Task;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-schedule")
public interface IScheduleClient {

    @PostMapping("/api/v1/task/add")
    ResponseResult addTask(@RequestBody Task task);

    @GetMapping("/api/v1/task/cancel/{taskId}")
    ResponseResult cancelTask(@PathVariable("taskId") long taskId);

    @GetMapping("/api/v1/task/poll")
    ResponseResult poll();
}
